<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<input type="button" value="属性绑定" onclick="fn1()">
<input type="button" value="动态绑定" id="btn">
<script type="text/javascript">
function fn1(){
	alert("属性绑定事件触发")
}
//动态绑定事件
btn.onclick=function(){
	alert("动态绑定事件");
}
</script>
</body>
</html>